package com.zx.erp.sys.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zx.erp.sys.bean.City;
import com.zx.erp.sys.bean.Dept;
import com.zx.erp.sys.bean.Province;
import com.zx.erp.sys.bean.Users;
import com.zx.erp.sys.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 作者信息
 * @since 2021-11-10
 */
@Controller
@RequestMapping("/sys/area")
public class CityController {
    @Autowired
    private CityService cityService;
    @RequestMapping("/list")
    public String cityview(Model model, Province province, @RequestParam(value = "pageNo", defaultValue = "1") Integer
            pageNo)
    {
        Integer pageSize = 6;
        Page<Province> pageInfo = cityService.cityPage(province, pageNo, pageSize);
        model.addAttribute("pageInfo", pageInfo);
        model.addAttribute("user", province);
    return "forward:/sys/area/areaList.html";
}
}

